package connotation.ui

import android.content.Intent
import android.support.v7.app.AppCompatActivity
import android.os.Bundle
import android.view.Window
import android.view.WindowManager
import com.zyf.connotation.R
import com.zyf.connotation.ui.MainActivity
import rx.Observable
import java.util.concurrent.TimeUnit

class WelcomeActivity : AppCompatActivity() {

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        requestWindowFeature(Window.FEATURE_NO_TITLE)
        window.setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
                WindowManager.LayoutParams.FLAG_FULLSCREEN)
        setContentView(R.layout.activity_welcome)
        Observable.timer(3, TimeUnit.SECONDS).subscribe {
            startActivity(Intent(this@WelcomeActivity,MainActivity::class.java))
            finish()
        }
    }
}
